﻿<%@ Page Language="C#" MasterPageFile="~/BasicBase/BasicBase.master" AutoEventWireup="true"
    CodeFile="SearchWater.aspx.cs" Inherits="BasicBase_WaterSource_SearchWater" Title="无标题页"
    StylesheetTheme="Content" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" cellpadding="0" cellspacing="0" class="intable">
        <caption>
            <span>水源查询</span>
        </caption>
        <tr>
            <td style="width: 10%">
                选择辖区：
            </td>
            <td style="width: 40%">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlProvinces" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlProvinces_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlCities" runat="server" AutoPostBack="True">
                        </asp:DropDownList>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="ddlProvinces" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        正在加载...
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </td>
            <td style="width: 7%">
                道路：
            </td>
            <td style="width: 43%">
                <asp:TextBox ID="RoadName" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                隶属单位：
            </td>
            <td>
                <asp:UpdatePanel runat="server" ID="UpdatePanel2">
                    <ContentTemplate>
                        <asp:DropDownList ID="DepartmentList" runat="server" AutoPostBack="True" DataTextField="ShortName"
                            DataValueField="DepartmentID" OnTextChanged="DepartmentList_TextChanged" AppendDataBoundItems="True">
                            <asp:ListItem Value="" Text="--单位--"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="UnitList" runat="server" DataTextField="ShortName" DataValueField="DepartmentID"
                            AppendDataBoundItems="True">
                        </asp:DropDownList>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
            <td>
                状态：
            </td>
            <td>
                <asp:RadioButtonList ID="Status" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                    <asp:ListItem Value="1">可用</asp:ListItem>
                    <asp:ListItem Value="0">不可用</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td align="center">
            </td>
            <td align="center">
                <ul class="topmenu">
                    <li>
                        <asp:LinkButton ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" /></li>
                </ul>
            </td>
        </tr>
    </table>
    <%--  <asp:UpdatePanel ID="upBind" runat="server">
        <ContentTemplate>--%>
    <div style="display: block; overflow: visible;">
        <asp:Label ID="lblInfo" runat="server" ForeColor="#FF8000"></asp:Label>
        <asp:GridView ID="gvWater" runat="server" AutoGenerateColumns="False" DataKeyNames="WaterID"
            PageSize="10" OnRowDeleting="gvWater_RowDeleting" Caption="<span>水源列表</span>"
            OnRowDataBound="gvWater_RowDataBound">
            <Columns>
                <asp:TemplateField>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle Width="30px" />
                    <ItemTemplate>
                        <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="WaterBH" HeaderText="编号" />
                <asp:BoundField DataField="Location" HeaderText="位置" />
                <asp:BoundField DataField="JingDu" HeaderText="经度" />
                <asp:BoundField DataField="WeiDu" HeaderText="纬度" />
                <%-- <asp:BoundField DataField="Pressure" HeaderText="压力(kg/cm<sup>2</sup>)" HtmlEncode="False" />
                        <asp:BoundField DataField="KouJing1" HeaderText="口径一(mm)" />
                        <asp:BoundField DataField="KouJing2" HeaderText="口径二(mm)" />--%>
                <asp:BoundField DataField="DepartmentName" HeaderText="辖区单位" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <a href='<%# Eval("WaterID", "ViewWater.aspx?ID={0}") %>'>
                            <img src="../../Images/icon_task_search.gif" border="0" alt="查看"></a> <a href='<%# Eval("WaterID", "NewWater.aspx?ID={0}") %>'>
                                <img src="../../Images/Edit.gif" border="0" alt="编辑记录"></a>
                        <asp:ImageButton ID="ButtonDelete" runat="server" ImageUrl="~/Images/Delete.gif"
                            ToolTip="删除记录" CommandName="Delete" OnClientClick="return confirm('你确定要删除此道路的数据吗?');" />
                    </ItemTemplate>
                    <HeaderStyle Width="42px" />
                    <ItemStyle HorizontalAlign="Right" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Left" />
            <HeaderStyle HorizontalAlign="Left" />
        </asp:GridView>
        <asp:Panel Width="100%" runat="server" ID="panPage" Visible="false">
            <div style="padding: 4px;">
                <div style="float: left">
                    <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
                </div>
                <div style="float: right">
                    <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                        OnClick="btnFirst_Click">首页</asp:LinkButton>
                    <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                        OnClick="btnPrev_Click">上一页</asp:LinkButton>
                    <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                        OnClick="btnNext_Click">下一页</asp:LinkButton>
                    <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                        OnClick="btnLast_Click">末页</asp:LinkButton>
                    转到：第
                    <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
                    </asp:DropDownList>
                    页
                </div>
            </div>
        </asp:Panel>
    </div>
    <%-- <asp:BoundField DataField="Pressure" HeaderText="压力(kg/cm<sup>2</sup>)" HtmlEncode="False" />
                        <asp:BoundField DataField="KouJing1" HeaderText="口径一(mm)" />
                        <asp:BoundField DataField="KouJing2" HeaderText="口径二(mm)" />--%> 
</asp:Content>
